//
// Created by Administrator on 2021/5/21.
//

#include "iostream"

using namespace std;

/*
 * 1.数据类型 数组名【数组长度】
 * 2.数据类型 数组名【数组长度】
 */
int main(){
    //1.
    int arr[5];
    arr[0] = 0;
    arr[1] = 1;
    arr[2] = 2;
    arr[3] = 3;
    arr[4] = 4;

    cout << arr[0] << endl;
    cout << arr[1] << endl;
    cout << arr[2] << endl;
    cout << arr[3] << endl;
    cout << arr[4] << endl;

    //2.

    int arr2[5] = {0, 1, 2, 3, 4};

    for (int i = 0; i < 5; i++) {
        cout << arr2[i] <<endl;
    }
//    cout << arr2[0] << endl;

    //3.

    int arr3[] = {90, 80, 70, 60, 50, 40, 30, 20, 10};
    for (int i = 0; i < 9; i++) {
        cout << arr3[i] << endl;
    }
    system("pause");

    return 0;
}